package com.myaihui.service.impl;

import com.myaihui.domain.WechatUser;
import com.myaihui.repository.WechatUserRepository;
import com.myaihui.service.WechatUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * *******************************
 * Created by Tim.
 * form com.matt
 * on 2018/5/24
 * *******************************
 */
@Service
public class WechatUserServiceImpl implements WechatUserService {
    @Autowired
    private WechatUserRepository wechatUserRepository;

    @Override
    public WechatUser getById(String id) {
        return wechatUserRepository.findOne(id);
    }


    @Override
    public WechatUser getByMobile(String mobile) {
        return wechatUserRepository.findByMobile(mobile);
    }
}
